package com.openvas.domain;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.openvas.commons.common.annotation.Excel;
import com.openvas.commons.common.core.domain.BaseEntity;

/**
 * 用户对象 table_user
 * 
 * @author ruoyi
 * @date 2021-11-04
 */
public class TableUser extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 主键id */
    private Long id;

    /** 用户所有者 */
    @Excel(name = "用户所有者")
    private String owner;

    /** 用户名称 */
    @Excel(name = "用户名称")
    private String name;

    /** 用户密码 */
    @Excel(name = "用户密码")
    private String password;

    /** 备注 */
    @Excel(name = "备注")
    private String comment;

    /** 创建时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date creationTime;

    /** 修改时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "修改时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date modificationTime;

    /** 用户是否可写 */
    @Excel(name = "用户是否可写")
    private Integer writable;

    /** 用户是否再使用中 */
    @Excel(name = "用户是否再使用中")
    private Integer inUse;

    /** 权限名称 */
    @Excel(name = "权限名称")
    private String permissions;

    /** 用户主机访问规则 (0 禁止,1 允许,2 所有允许,3 自定义) */
    @Excel(name = "用户主机访问规则 (0 禁止,1 允许,2 所有允许,3 自定义)")
    private Integer hostsAllow;

    /** 来源（来源允许为此用户进行身份验证） */
    @Excel(name = "来源", readConverterExp = "来=源允许为此用户进行身份验证")
    private String sources;

    /** 用户的 Iface 访问规则 (0 禁止， 1 允许， 2 所有允许， 3 自定义) */
    @Excel(name = "用户的 Iface 访问规则 (0 禁止， 1 允许， 2 所有允许， 3 自定义)")
    private Integer ifacesAllow;

    /** 角色id */
    @Excel(name = "角色id")
    private Long roleId;

    /** 角色名称 */
    @Excel(name = "角色名称")
    private String roleName;

    /** 分组id */
    @Excel(name = "分组id")
    private Long groupId;

    /** 分组名称 */
    @Excel(name = "分组名称")
    private String groupName;

    /** 用户名称 */
    @Excel(name = "用户名称")
    private String userName;

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }
    public void setOwner(String owner) 
    {
        this.owner = owner;
    }

    public String getOwner() 
    {
        return owner;
    }
    public void setName(String name) 
    {
        this.name = name;
    }

    public String getName() 
    {
        return name;
    }
    public void setPassword(String password) 
    {
        this.password = password;
    }

    public String getPassword() 
    {
        return password;
    }
    public void setComment(String comment) 
    {
        this.comment = comment;
    }

    public String getComment() 
    {
        return comment;
    }
    public void setCreationTime(Date creationTime) 
    {
        this.creationTime = creationTime;
    }

    public Date getCreationTime() 
    {
        return creationTime;
    }
    public void setModificationTime(Date modificationTime) 
    {
        this.modificationTime = modificationTime;
    }

    public Date getModificationTime() 
    {
        return modificationTime;
    }
    public void setWritable(Integer writable) 
    {
        this.writable = writable;
    }

    public Integer getWritable() 
    {
        return writable;
    }
    public void setInUse(Integer inUse) 
    {
        this.inUse = inUse;
    }

    public Integer getInUse() 
    {
        return inUse;
    }
    public void setPermissions(String permissions) 
    {
        this.permissions = permissions;
    }

    public String getPermissions() 
    {
        return permissions;
    }
    public void setHostsAllow(Integer hostsAllow) 
    {
        this.hostsAllow = hostsAllow;
    }

    public Integer getHostsAllow() 
    {
        return hostsAllow;
    }
    public void setSources(String sources) 
    {
        this.sources = sources;
    }

    public String getSources() 
    {
        return sources;
    }
    public void setIfacesAllow(Integer ifacesAllow) 
    {
        this.ifacesAllow = ifacesAllow;
    }

    public Integer getIfacesAllow() 
    {
        return ifacesAllow;
    }
    public void setRoleId(Long roleId) 
    {
        this.roleId = roleId;
    }

    public Long getRoleId() 
    {
        return roleId;
    }
    public void setRoleName(String roleName) 
    {
        this.roleName = roleName;
    }

    public String getRoleName() 
    {
        return roleName;
    }
    public void setGroupId(Long groupId) 
    {
        this.groupId = groupId;
    }

    public Long getGroupId() 
    {
        return groupId;
    }
    public void setGroupName(String groupName) 
    {
        this.groupName = groupName;
    }

    public String getGroupName() 
    {
        return groupName;
    }
    public void setUserName(String userName) 
    {
        this.userName = userName;
    }

    public String getUserName() 
    {
        return userName;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("owner", getOwner())
            .append("name", getName())
            .append("password", getPassword())
            .append("comment", getComment())
            .append("creationTime", getCreationTime())
            .append("modificationTime", getModificationTime())
            .append("writable", getWritable())
            .append("inUse", getInUse())
            .append("permissions", getPermissions())
            .append("hostsAllow", getHostsAllow())
            .append("sources", getSources())
            .append("ifacesAllow", getIfacesAllow())
            .append("roleId", getRoleId())
            .append("roleName", getRoleName())
            .append("groupId", getGroupId())
            .append("groupName", getGroupName())
            .append("userName", getUserName())
            .toString();
    }
}
